#ifndef MARIO_H
#define MARIO_H

#include "Engine2D/game.h"
#include "dynamicobject.h"
#include "staticobject.h"
#include "Engine2D/animation.h"
#include "Engine2D/quadtree"
#include "Engine2D/text.h"

using namespace game;

#define RIGHT_STAND 0
#define LEFT_STAND 1
#define RIGHT_MOVE 2
#define LEFT_MOVE 3
#define RIGHT_SHIFT 4
#define LEFT_SHIFT 5
#define RIGHT_DOWN 6
#define LEFT_DOWN 7
#define RIGHT_JUMP 8
#define LEFT_JUMP 9

#define SLOW_SPEED 1000 / 20
#define FAST_SPEED 1000 / 40

#define NO_COLLIDE 0
#define LEFT_COLLIDE 1
#define TOP_COLLIDE 2
#define RIGHT_COLLIDE 3
#define BOTTOM_COLLIDE 4

class Mario : public DynamicObject
{	
  public:
    Mario(GameGraphic*, GameInput*, QuadTree<GameObject>*, int, int, float, float, float);
    virtual Rect GetRectBound();
    virtual void Update(unsigned int = 0);
    virtual void Render(unsigned int = 0);
    virtual ~Mario();
		
  private:
	QuadTree<GameObject>* worldMap;
    int widthScreen;
    int heightScreen;
    GameInput* pInput;
    Animation action[2];
    float big;
    int state;
    unsigned int timeShift;
    unsigned int speed;
    unsigned int move;
    unsigned int jump;
    bool test;
    float oldPosY;
    Sprite* textSprite;
    Text text;
    int score;
    int increase;
    float scale;
    int life;
};

#endif